-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(nextjs): Add browser SDK to app
directory browser bundle
#6812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
size-limit report 📦
|
e453015
to
4c3e556
Compare
ec7441d
to
674f58e
Compare
{ | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"typescript.enablePromptUseWorkspaceTsdk": true | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah. Next.js 13 seems to auto-generate this - I gitignored it.
@@ -0,0 +1,5 @@ | |||
'use client'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol @ the fact that the nextjs api uses directives like this
@@ -9,4 +9,4 @@ const handler = async (_req: NextApiRequest, res: NextApiResponse): Promise<void | |||
res.status(200).json({}); | |||
}; | |||
|
|||
export default withSentry(handler); | |||
export default wrapApiHandlerWithSentry(handler, '/api/http'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we be autowrapping these anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually yes. I removed the wrappers and everything still seems to pass 👍
Sorry to bother, but can this get a publish to npm (even as a canary/beta release?). It's blocking me from tracking errors in my app directory client routes. |
@switz We're probably gonna release this change as part of a release on Monday. This will add client-side monitoring to the app directory. Server-side monitoring still needs some work. |
Ref: #6726
This PR injects the Next.js SDK into the browser code when the
app
directory is used.Note: Pageload transactions seem to work fine. Navigation transactions don't fire yet.